//
//  FocusScrollView.m
//  HiveApp
//
//  Created by Zhu Xiangjun on 9/26/12.
//  Copyright (c) 2012 HiveView. All rights reserved.
//

#import "FocusScrollView.h"
#import "ImageLoadView.h"
#import "FocusData.h"

@implementation FocusScrollView

- (void)makeFocuses:(NSArray*)focusArray {
    
    int count = [focusArray count];
    
    [self setContentSize:CGSizeMake(self.frame.size.width*count, self.frame.size.height)];
    
    for(int i = 0 ; i < count ; i++){
        FocusData *data = [focusArray objectAtIndex:i];
        
        ImageLoadView *loadView = [[ImageLoadView alloc] initWithFrame:CGRectMake(self.frame.size.width*i, 0, self.frame.size.width, self.frame.size.height)];
        [loadView setImageUrl:data.focusimage];
        [self addSubview:loadView];
        [loadView release];
        
    }
    
}

@end
